package mis510.homefinders;



import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

@SuppressWarnings("deprecation")
public class Evaluation extends TabActivity{
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
        Intent intent = this.getIntent();
		Bundle bundle = intent.getExtras();
		String search_address = null;
		search_address = bundle.getString("address");
		System.out.println("passed address: "+search_address);
		
			System.out.println("in evaluation");
	        setContentView(R.layout.evaluation);
	        
	        TabHost mTabHost = getTabHost();
	        //mTabHost.setup(this, getSupportFragmentManager(), R.id.realtabcontent);
	        	      	        
	        System.out.println("after tab");
	        // Tab for Photos
	        TabSpec binfo_spec = mTabHost.newTabSpec("Basic Info");
	        System.out.println("1");
	        // setting Title and Icon for the Tab
	        binfo_spec.setIndicator("Basic Info");
	        System.out.println("2");
	        Intent binfo_Intent = new Intent(this, Basic_info.class);
	        System.out.println("3");
	        binfo_spec.setContent(binfo_Intent);
	        System.out.println("4");
	 
	        // Tab for Songs
	        TabSpec map_spec = mTabHost.newTabSpec("Map");
	        map_spec.setIndicator("Map");
	        Intent map_Intent = new Intent(this, Map.class);
	        map_spec.setContent(map_Intent);
	 
	        // Tab for Videos
	        TabSpec trans_spec = mTabHost.newTabSpec("Transportation");
	        trans_spec.setIndicator("Transportation");
	        Intent trans_Intent = new Intent(this, Transportation.class);
	        trans_spec.setContent(trans_Intent);
	 
	        System.out.println("5");
	        // Adding all TabSpec to TabHost
	        
	        mTabHost.addTab(binfo_spec); // Adding photos tab
	        mTabHost.addTab(map_spec); // Adding songs tab
	        mTabHost.addTab(trans_spec); // Adding videos tab
	        System.out.println("set tab");
	    }

		
		//new Zillow().execute(search_address);
//		String result;
//		try {
//			result = validation.get();
//		//String result = null;
//		// StringTokenizer st = new StringTokenizer(str);
//		if (result.equals("Error: no exact match found for input address"))
//		{
//			System.out.println("Results not found");
//		}
//		else
//		{
//		 StringTokenizer st2 = new StringTokenizer(result, ",");
//		 
//		 		String year = st2.nextToken();
//				System.out.println(year);
//
//				String sqr = st2.nextToken();
//				System.out.println(sqr); 
//				
//				String bat = st2.nextToken();
//				System.out.println(bat); 
//
//				String bed = st2.nextToken();
//				System.out.println(bed);
//
//				String res = st2.nextToken();
//				System.out.println(res);
//
//				System.out.println();
//				
//				String over = st2.nextToken();
//				System.out.println(over);
//
//				System.out.println();
//				String over2 = st2.nextToken();
//				System.out.println(over2);
//
//				System.out.println();
//				String over3 = st2.nextToken();
//				System.out.println(over3);
//
//				System.out.println();
//				String over1 = st2.nextToken();
//				System.out.println(over1);
//		}
//		
//		} catch (InterruptedException e) {
//		// TODO Auto-generated catch block
//			e.printStackTrace();
//		} catch (ExecutionException e) {
//		// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
}

